package cn.e4j.modular.crm.controller.bb;

import cn.e4j.core.dto.impl.Dto;
import cn.e4j.core.dto.requestDtoResolver.DtoParam;
import cn.e4j.core.dto.requestDtoResolver.DtoWapper;
import cn.e4j.core.reqres.response.ResponseData;
import cn.e4j.core.reqres.response.SuccessResponseData;
import cn.e4j.modular.api.service.BbFxbService;
import cn.e4j.modular.api.util.ControllerSupport;
import cn.e4j.modular.system.service.impl.SystemServiceImpl;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 费效比
 */
@Controller
@RequestMapping("/bb/fxb")
public class BbFxbController extends ControllerSupport {

    @Autowired
    BbFxbService bbFxbService;


    /**
     * 跳转页面
     */
    @RequiresPermissions("bb:fxb:init")
    @RequestMapping(value = {"", "init"})
    public String index() {
        return "/pc/crm/bb/fxb.html";
    }



    @RequiresPermissions("bb:fxb:init")
    @ResponseBody
    @RequestMapping(value = "getListData")
    public ResponseData getListData(@DtoParam DtoWapper dtoWapper) {
        Dto inDto = dtoWapper.getDto();
        return new SuccessResponseData(bbFxbService.getListData(inDto));
    }

}
